﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KinectTD.MapControl;
using Microsoft.Xna.Framework.Input;
using KinectTD.Game_Management;
using KinectTD.Input;
namespace KinectTD.State_Management
{
    class GameScreen : Screen
    {
        
        private Level level;

        public GameScreen(int width, int height) : base(width, height)
        {
            level = new Level(Engine.gamePlayer, Engine.GameViewport);
            
        }

        protected override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            level.LoadContent(Content);
          
            
        }

        public override void Update(Microsoft.Xna.Framework.GameTime gameTime)
        {
            if (Kinect.RaisedHands)
                Engine.GameStack.Push(new PauseScreen(Width, Height));
            level.Update(gameTime);
           
        }

        public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
        {
            if (level != null)
                level.Draw(spriteBatch);
            
        }

    }
}
